import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Weapons from '../views/Weapons.vue'
import Armors from '../views/Armors.vue'
import Other from '../views/Other.vue'
import WeaponInfo from '../views/WeaponInfo.vue'
import ArmorInfo from '../views/ArmorInfo.vue'
import ItemLegend from '../views/ItemLegend.vue'
import ItemLegends from '../views/ItemLegends.vue'
import SealsLegend from '../views/SealsLegend.vue'
import LegendDetail from '../views/LegendDetail'


Vue.use(VueRouter)

const routes = [{
    path: '/',
    name: 'Home',
    component: Home,
    meta: {
      showTab: true,
      keepAlive: true

    }
  },
  {
    path: '/about',
    name: 'About',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import( /* webpackChunkName: "about" */ '../views/About.vue'),
    meta: {
      showTab: true,
      keepAlive: true

    }
  },
  {
    path: '/Weapons/:id',
    name: 'Weapons',
    component: Weapons,
    meta: {
      showTab: false,
      keepAlive: false

    }
  },
  {
    path: '/Armors/:id',
    name: 'Armors',
    component: Armors,
    meta: {
      showTab: false,
      keepAlive: false

    }
  },
  {
    path: '/Other/:id',
    name: 'Other',
    component: Other,
    meta: {
      showTab: false,
      keepAlive: false

    }
  },
  {
    path: '/WeaponInfo/:id',
    name: 'WeaponInfo',
    component: WeaponInfo,
    meta: {
      showTab: false,
      keepAlive: false
    }
  },
  {
    path: '/ArmorInfo/:id',
    name: 'ArmorInfo',
    component: ArmorInfo,
    meta: {
      showTab: false,
      keepAlive: false

    }
  },
  {
    path: '/ItemLegend/:id',
    name: 'ItemLegend',
    component: ItemLegend,
    meta: {
      showTab: false,
      keepAlive: false

    }
  },
  {
    path: '/ItemLegends/:id',
    name: 'ItemLegends',
    component: ItemLegends,
    meta: {
      showTab: false,
      keepAlive: false

    }
  },
  {
    path: '/SealsLegend/:id',
    name: 'SealsLegend',
    component: SealsLegend,
    meta: {
      showTab: false,
      keepAlive: false

    }
  },
  {
    path: '/LegendDetail/:id',
    name: 'LegendDetail',
    component: LegendDetail,
    meta: {
      showTab: false,
      keepAlive: false

    }
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router